-> opening
== opening

Hello! Welcome to CLO!

// sticky choice example
+ [new game]
-> wake_up

// one-time choice
* exit
-> END

== wake_up
VAR STD = 3
VAR EXC = 1
VAR library_level = 1
~ library_level = 1 + battle_win

You woke up. 

// show only one times
{Remember to study and exercise to pass the final exam.|}
You have 30 days. Today is day {wake_up}.

-> choice

== choice
* {wake_up == 30}Today is the E-day. Time to finish this!
-> exam

+ {wake_up != 30}[go to library (study).]
-> library
+ {wake_up != 30}[go to gym (exercise).]
-> gym
+ {advice}[go to battle!!!]
-> battle
+ {wake_up != 30}[go back to sleep.]
-> sleep
+ {wake_up != 30}[sleep until exam (go directly to exam)]
-> bigsleep

+ [seek advice.] You went for the Manager for advices.
-> advice

== advice
After she received considerable tip, the Manager told you softly,

// recycling sequence
{&"Help hunting down monsters in campus will help you study and exercise more efficiently!"|"In the battle, your knowledge will add to your HP, and your strength will contribute to your ATK."|"Every time you win the battle, the enemy will become stronger next time. Hone your skill before battle next time!"|}

-> choice
== sleep

"I worked so hard today..."
You fell into sleep.
One day passed.

+ [wake up]
-> wake_up

== bigsleep

You hibernated like a bear...

+ [wake up]
-> exam

== library

You go to library to study.
{library_level > 1: Since you cleaned the rampaging monsters, you can now go to further place to seek more knowledge.}
// a sequence. When it runs out of new content it continues the show the final element
{The librarian passed you by.|The librarian smiled at you.}

study point + {library_level}!
~ STD = STD + library_level

You studied until 22:00. The library closed.

+ [go back to sleep]
-> sleep

== gym

You go to gym to exercise.
{library_level > 1: Since you cleaned the rampaging monsters, you can now utilize more facility to exercise.}
{The coach looked at you surprisingly.|The coach gave you some advises.}

gym point + {library_level}!
~ EXC = EXC + library_level

You exercised until dinner time. After dinner, you feeled like a rest.

+ [go back to sleep]
-> sleep

=== exam

First, the paper work!
* You go for the paper.
-> paperwork

== paperwork

* {STD < 9} You failed... 
How could it be...
-> gameover

* {STD > 8} You passed! 
Hard work paid off!
-> gymwork

== gymwork

Last, 3km run!
* {EXC < 9} You failed...
How could it be...
-> gameover

* {EXC > 8} You passed!
Hard work paid off!
-> goodend

=== goodend

To celebrate, you and your friend go out to play for a total week.
Nice work! No pain, no gain.
-> END

=== gameover

GAME OVER.
Maybe you should work harder next time?
To restart, you need to close the browser and open it again.
* [Quit]
-> END

=== battle
VAR your_hp = 3
~ your_hp = 3 + STD
VAR your_atk = 1
~ your_atk = 1 + EXC

VAR enemy_hp = 4
VAR enemy_atk = 2
~ enemy_hp = 4 + 5* battle_win
~ enemy_atk = 2 + 3* battle_win

You encountered with Slime!
Time to fight or flight!

-> battle_option

== battle_option
{enemy_hp > your_atk: The Slime looked at you fiercely.|The Slime is thrembling and trying to escape...}
{your_hp <= enemy_atk: You feel like falling down...}

Your HP = {your_hp}
Your ATK = {your_atk}
Slime HP = {enemy_hp}
Slime ATK = {enemy_atk}

+ [fight!]
-> attack
+ [run!]
-> choice

== attack
You attack first!

~ enemy_hp = enemy_hp - your_atk

Slime HP = {enemy_hp + your_atk} - {your_atk} = {enemy_hp}

{enemy_hp < 1: -> battle_win}

Slime attacked you!
~ your_hp = your_hp - enemy_atk

Your HP = {your_hp + enemy_atk} - {enemy_atk} = {your_hp}

{your_hp < 1: -> battle_lost | -> battle_option}

== battle_win

winner is you!

You got achievement: {First Blood|Double Kill|Triple Kill|Unstoppable}!

+ time to rest.
-> sleep
 
== battle_lost

you lose...
"...SHOULD HAVE HCG HERE..."
you crawl back to home after tainted by the Slime...
+ must win next time...
-> sleep
    

